<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    b {
      font-size: 12px;
      color: red;
    }
    input {
      width: 220px;
      height: 20px;
    }
  </style>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
  <script>
    $(function () {
      $("#btn").on("click", function () {
        if (
          $("#zhutu").val() != "" &&
          $("#title").val() != "" &&
          $("#time").val() != "" &&
          $("#addr").val() != "" &&
          $("#jine").val() != "" &&
          $("#xiangqu").val() != ""
        ) {
          $.get("http://2107.wqdp.com.cn/mysql/exhibition", {
            zhutu: $("#zhutu").val(),
            title: $("#title").val(),
            time: $("#time").val(),
            addr: $("#addr").val(),
            jine: $("#jine").val(),
            xiangqu: $("#xiangqu").val(),
          }).then((res) => {
            // console.log(res);
            if(res.status==0){
                alert("插入成功");
            }
          });
        }
      });
    });
  </script>
  <body>
    <h1>exhibition数据库插入</h1>
    <span>主图Url:<input type="text" id="zhutu" /></span><br />
    <span>标题：<input type="text" id="title" /></span><br />
    <span>时间：<input type="text" id="time" /></span
    ><b>实例：2021年10月30 - 10月31日</b><br />
    <span>地区<input type="text" id="addr" /></span><b>实例：浙江省 杭州市 滨江区</b><br />
    <span>金额：<input type="text" id="jine" /><b>number</b></span><br />
    <span>多少人想去：<input type="text" id="xiangqu" /><b>number</b></span><br />
    <button id="btn">提交</button>
  </body>
</html>
